/*
会变的光
*/
var { Plot } = require("../Plot.js");
/**
 * @type {HTMLCanvasElement}
 */
var canvasDom = document.querySelector("#myCanvas");
var plot = new Plot(canvasDom)
canvasDom.width = document.body.clientWidth;;
canvasDom.height = document.body.clientHeight;

var itick = 0;
setInterval(function () {
	itick++;
	var sc4 = new Array(4);
	var c = ((Math.sin(itick / 240) + 1) / 2) * 256

	console.log(Math.floor(c));
	sc4.fill(Math.floor(c));
	c[3] = 255
	plot.fillColor(sc4);
}, 10)
// plot.fillColor()